using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content.Pipeline;
using Microsoft.Xna.Framework.Content.Pipeline.Graphics;
using Microsoft.Xna.Framework.Content.Pipeline.Processors;

namespace XDLPipeline
{
    /// <summary>
    /// Dedicated process for weapon definition.
    /// </summary>
    [ContentProcessor(DisplayName = "Weapon Definition Processor")]
    public class WeaponSettingsProcessor : ContentProcessor<WeaponSettingsContent, WeaponSettingsContent>
    {
        public override WeaponSettingsContent Process(WeaponSettingsContent input, ContentProcessorContext context)
        {
            // basic validation
            if (input.Radius < 0)
                throw new InvalidContentException(string.Format("Invalid (negative) collision radius: {0}", input.Radius), new ContentIdentity(context.OutputFilename));

            return input;
        }
    }
}